import request from '@/utils/request'

// 查询商品采购价格列表
export function listPurchasePrice(query) {
  return request({
    url: '/goods/skuPurchasePrice/list',
    method: 'post',
    data: query
  })
}

// 查询商品采购价格详细
export function getPurchasePrice(id) {
  return request({
    url: '/goods/skuPurchasePrice/' + id,
    method: 'get'
  })
}

// 新增商品采购价格
export function addPurchasePrice(data) {
  return request({
    url: '/goods/skuPurchasePrice/add',
    method: 'post',
    data: data
  })
}

// 修改商品采购价格
export function updatePurchasePrice(data) {
  return request({
    url: '/goods/skuPurchasePrice/update',
    method: 'post',
    data: data
  })
}

// 删除商品采购价格
export function delPurchasePrice(id) {
  return request({
    url: '/goods/skuPurchasePrice/delete/' + id,
    method: 'post'
  })
}

export function preAudit(id) {
  return request({
    url: '/goods/skuPurchasePrice/preAudit/' + id,
    method: 'post'
  })
}

export function preAuditCancel(id) {
  return request({
    url: '/goods/skuPurchasePrice/preAuditCancel/' + id,
    method: 'post'
  })
}

export function reAudit(id) {
  return request({
    url: '/goods/skuPurchasePrice/reAudit/' + id,
    method: 'post'
  })
}

export function savePurchasePrice(data) {
  return request({
    url: '/goods/skuPurchasePrice/save',
    method: 'post',
    data: data
  })
}

export function closePurchasePrice(id) {
  return request({
    url: '/goods/skuPurchasePrice/close/' + id,
    method: 'post'
  })
}
